package com.example.fashionshoes.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.fashionshoes.mapper.UserCouponMapper;
import com.example.fashionshoes.pojo.po.Coupon;
import com.example.fashionshoes.pojo.po.UserCoupon;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCoupon> implements UserCouponService{
    @Resource
    private UserCouponMapper userCouponMapper;
    /**
     * 获取仅指定分类或指定商品可用的优惠劵
     *
     * @return 优惠劵集合
     */

    @Override
    public List<Coupon> getLimitCoupon(Integer userId, Integer goodsId) {
        return userCouponMapper.getLimitCoupon(userId,goodsId);
    }
}
